#!/usr/bin/python
# -*- coding: utf-8 -*-

import sys
from PyQt4 import Qt, QtGui, QtCore

from libmovies.MovieData import *
from libmovies.MdiWindow import MdiWindow
from libmovies.MainWindow import MainWindow



if __name__ == "__main__":
    app = QtGui.QApplication(sys.argv)

    Options.load()
    
    filename = QtGui.QFileDialog.getOpenFileName(None, u"Открыть коллекцию фильмов", "", MainWindow.extMcfUser)
    if filename.length() != 0:
        filename = unicode(filename)
    
        mdiWindow = MdiWindow()
        mdiWindow.setReadonly(True)
        mdiWindow.load(filename)

        mdiWindow.show()
        app.exec_()
